import { Photo } from './Photo';
import { Entity, PrimaryGeneratedColumn, Column, OneToMany } from "typeorm"

@Entity()
export class User {

  @PrimaryGeneratedColumn()
  id: number

  @Column({ name: 'first_name' })
  firstName: string

  @Column({ name: 'last_name' })
  lastName: string

  @Column()
  age: number

  @OneToMany(() => Photo, (photo) => photo.user)
  photos: Photo[]

}
